The present invention relates to a nonrecursive digital filter and a method for calculating the coefficients of the filter.
Numerous products contain filters (e.g. tone controls of a television set or car radio, frequency splitters of loud-speaker systems) whose characteristic must be shiftable in the frequency direction.
If these filters are realized by digital signal processing, then recursive filters are usually used despite a number of disadvantages. This filter type is characterized in that it has only few parameters (coefficients) which have to be varied in order to scale the frequency response of the filter (e.g. in order to vary the cut off frequency) without having to vary the sampling frequency of the filter.
xe2x80x9cZeitdiskrete Signalverarbeitungxe2x80x9d [Discrete time signal processing] by Oppenheim and Schafer, Oldenburg Verlag, Munich, 1992, page 152 et seq. refers to the possibility of shifting the frequency response of a digital filter by varying the sampling frequency. However, this approach generally requires anti-aliassing filters or decimation filters with a variable cut-off frequency, i.e. the problem is merely shifted.
In this context, European published patent application EP 0 401 562 discloses a nonrecursive digital filter having a filter calculation unit which calculates an output signal from an input signal. The filter calculation unit is connected to a coefficient calculation unit, which supplies the coefficients for the filter calculation unit, and the coefficient calculation unit is connected to a coefficient memory, an operator interface, and a control unit.
Furthermore, the paper by Sangil Park, xe2x80x9cREAL TIME PITCH (FREQUENCY) SHIFTING TECHNIQUESxe2x80x9d in Proceedings of the International Conference on Consumer Electronics (ICCE), New York, USA, IEEE, Vol. Conf. 101 Jun. 1991, pages 296-97 disclosed a method for shifting the frequency/pitch of a signal in real time, in which, in the method, the signal is sampled at a second sampling rate, whose ratio with respect to the original sampling rate is chosen to correspond to the ratio of original pitch (frequency) to desired pitch (frequency), and in which the output samples are once more output at the original sampling rate.
The object of the present invention is to provide a nonrecursive digital filter which overcomes the above-noted deficiencies and disadvantages of the prior art devices and methods of this general kind, and the frequency response of which can be shifted in a simple manner at a constant sampling frequency. To that end, it is also an object of the present invention to provide the required calculation method for the coefficients of this filter.
With the above and other objects in view there is provided, in accordance with the invention, a method of calculating coefficients of a nonrecursive digital filter for shifting a frequency response of the filter from one characteristic frequency fc1 to another characteristic frequency fc2 The method comprises the following method steps: determining (i.e., prescribing or calculating) coefficients h1 (n) of a prototype of the filter for a given sampling frequency fa1;
calculating a continuous time impulse response h(t) associated with the prototype;
sampling the impulse response h(t) at a sampling frequency       fa2    =          fa1      *              fc1        fc2              ,
and thereby producing new coefficients h2 (n); and
operating the filter with the new coefficient h2 (n) at fa1.
With the above and other objects in view there is also provided, in accordance with the invention, a further method of calculating the coefficients of a nonrecursive digital filter for the purpose of shifting the frequency response of this filter from one characteristic frequency fc1 to another characteristic frequency fc2 The novel method has the following method steps:
determining coefficients h1 (n) of a prototype of the filter for a given sampling frequency fa1;
calculating new coefficients h2 (n) from the coefficients h1 (n) by interpolating the values of a continuous time impulse response h(t) at an interval 1/fa2, where       fa2    =          fa1      ⁢              fc1        fc2              ;
and
operating the filter with the new coefficient h2 (n) at fa1.
In accordance with an added feature of the invention, polynomials are used for the interpolation. Preferably, only polynomials of order 0 to 3 are used.
In accordance with an additional feature of the invention, the continuous time filter is sampled starting from a temporal midpoint.
In accordance with another feature of the invention, the filter prototype is defined with N coefficients h1 (n), where n=0,1, . . . , Nxe2x88x921, and the interpolation is performed at the points   t  =                    N        -        1                    2        *        fa1              +          k      fa2      
where
k=0;+/xe2x88x921;+/xe2x88x922, . . .
k being incremented or decremented until all the coefficients h1 (n) used for the respective interpolation have the value 0.
In accordance with a further feature of the invention, only the coefficients where k=0; +1; +2 . . . are calculated since the coefficients with negative k correspond to the corresponding coefficients with positive k.
In accordance with again an added feature of the invention, the new coefficients h2 (n) are multiplied by the samples of a sine or cosine function having a frequency fo.
It is known from systems theory (Fourier transformation) that shifting of the frequency response of a filter and opposite shifting of the impulse response of the filter correspond to one another. The coefficients of a digital nonrecursive filter (prototype of the frequency characteristic) represent samples of such an impulse response. In principle, the continuous time profile of the impulse response can then be calculated from the samples, with a sampling frequency fa1 being prescribed. Coefficients of a nonrecursive digital filter are again obtained by sampling the continuous time signal at another sampling frequency fa2. If this filter is then operated at the sampling frequency fa1, the desired shifted frequency characteristic is obtained. If fa2 is chosen to be greater than fa1, then the frequency characteristic of the filter is compressed, and for fa2 less than fa1 the characteristic is expanded. In this case, the actual problem consists in the interpolation of the new coefficients from the coefficients of the prototype. This interpolation corresponds to the combination of reconstruction of the continuous time impulse response and sampling thereof at fa2. The realization details are explained in detail below:
Let H(f) be the Fourier transform of the impulse response h(t) of a linear system, in short: h(t)H(f). The following holds true in that case: h(a*t) 1/a*H(f/a), i.e. if the impulse response h(t) is expanded (a less than 1), then the transform H(f) is compressed, and vice versa. In addition, the transform H(f) is xe2x80x9camplifiedxe2x80x9d by the factor 1/a.
In principle, this property is also preserved after the sampling of the impulse response, as long as the sampling theorem is not violated. If the theorem is violated, care must be taken to ensure that the desired frequency characteristic H(f/a) is not varied impermissibly.
Assume that a digital filter is operated at the sampling frequency fa1 and then has the characteristic frequency (e.g. 3 dBxe2x80x94cut off frequency of a low pass filter) fc1. If the same filter is then operated at the sampling frequency fa2, the new characteristic frequency fc1=fc1*(fa2/fa1) is produced.
The calculation of the coefficients of a new nonrecursive filter from the coefficients of a prescribed nonrecursive filter (called prototype hereinafter) with the aim of shifting the characteristic frequency from fc1 to fc2 is done as follows:
Step 1: Calculate coefficients h1 (n) of the prototype for the sampling frequency fa1.
Step 2: Calculate the associated continuous time impulse response h(t)
Step 3: Sampling of the impulse response h(t) at the sampling frequency fa2=(fc1/fc2)*fa1.
Step 4: operation of the new filter with the coefficients h2 (n) at fa1.
In order to be able to use this method in practice, even under real time conditions, steps 2 and 3 are combined, i.e. the new coefficients are calculated from the coefficients of the prototype. In this case, the values of the continuous time impulse response h(t) are interpolated at an interval of 1/fa2. In practice, polynomials are suitable, inter alia, for interpolation. In principle, the degree of the polynomials is arbitrary. In practice, for reasons of complexity, only polynomials of order 0 (holding element), of order 1 (linear interpolation), of order 2 (quadratic interpolation), or of order 3 (cubic interpolation) will be expedient.
If the prototype has a constant group delay time, then this property, which is generally particularly useful, can be transferred to the new filter by sampling the continuous time filter starting from the temporal midpoint. If the prototype has N coefficients h1 (n), where n=0,1, . . . , Nxe2x88x921, then the temporal midpoint of h(t) lies at the height tm=(N 1)/2* 1/fa1. As a result, h(t) must be interpolated at the points t=tm+k*1/fa2 where k=0, +/xe2x88x921, +/xe2x88x922 etc. The variable k must be incremented or decremented until all the discrete values h1 (n) used for the respective interpolation have the value zero.
On account of the symmetry of the impulse response, in principle only half of the coefficients actually have to be calculated (k greater than =0).
The Fourier transform also has the following property:
sin(2*xcfx80*f0*t)*h(t)1/(2i)*H(fxe2x88x92f0)xe2x88x921/(2i)*H(f+f0)
or
cos(2*xcfx80*f0*t)*h(t)1/2*H(fxe2x88x92f0)1/2*H(f+f0).
This also applies, with the restrictions already mentioned above, to sampled signals and thus to digital filters as well, i.e. if the coefficients of the filter are multiplied by the samples of a sine or cosine function having the frequency f0, then the original frequency characteristic is shifted by f0 (e.g. a low pass filter thus becomes a bandpass filter). As a result, using simple measures, the frequency responses of digital filters can be shifted even under real time conditions. As a result, e.g. equalizers with a constant group delay time (car radio, television sets, stereo system, etc.) can be constructed from nonrecursive filters. Conventional equalizers are constructed from recursive filters having major delay distortion.
With the above and other objects in view there is also provided, in accordance with the invention, a nonrecursive digital filter, comprising:
a filter calculation unit for calculating an output signal from an input signal;
a coefficient calculation unit connected to the filter calculation unit, the coefficient calculation unit supplying coefficients for the filter calculation unit; and
coefficient memory, an operator interface, and a control unit connected to the coefficient calculation unit.
In accordance with again an added feature of the invention, one or more further coefficient memories are connected between the coefficient calculation unit and the filter calculation unit.
In accordance with a concomitant feature of the invention, a plurality of coefficient memories are connected to the filter calculation unit via a selectoral switch.
Other features which are considered as characteristic for the invention are set forth in the appended claims.
Although the invention is illustrated and described herein as embodied in a nonrecursive digital filter and method for calculating the coefficients of this filter, it is nevertheless not intended to be limited to the details shown, since various modifications and structural changes may be made therein without departing from the spirit of the invention and within the scope and range of equivalents of the claims.
The construction and method of operation of the invention, however, together with additional objects and advantages thereof will be best understood from the following description of specific embodiments when read in connection with the accompanying drawings.